<?php include_once('blocks/navigator.php');
$detail = $tc->detail($row_menu_one['type_id'],$dt);
$row_detail = mysql_fetch_array($detail);
($row_detail['price']!=0) ? $price = number_format($row_detail['price']).'đ' : $price = 'Call';
$view_post .= '<div id="product_detail"><div id="viewpost"><h1>'.$row_detail['name'].'</h1>
<img src="'.url_product_image.$row_detail['url_hinh'].'" alt="'.$row_detail['name'].'" style="width:270px; float:left; margin:0 20px 20px 0" />
<p>Mã sản phẩm: <b>'.$row_detail['masp'].'</b></p> <p>Giá: <font color="#CC0000">'.$price.'</font></p>
'.$row_detail['content'].'</div><div style="clear:both; height:40px; border-bottom:solid 1px #d4d4d4"></div>';

$sp_cungloai = $tc->sp_cungloai($row_menu_one['id'],$row_detail['id']);
if(mysql_num_rows($sp_cungloai) > 0){
	$view_post .= '<div class="title">Sản phẩm cùng loại</div>';
	while($row_sp_cungloai = mysql_fetch_array($sp_cungloai)){
		($row_sp_cungloai['price']!=0) ? $price = number_format($row_sp_cungloai['price']).'đ' : $price = 'Call';
		$view_post .= '<div class="item"><a href="'.$row_menu_one['url'].$row_sp_cungloai['name_rewrite'].'.html"><img src="'.url_product_thumb_image.$row_sp_cungloai['url_hinh'].'" alt="" /><h4>'.$row_sp_cungloai['name'].'</h4></a>
		<p>Mã SP: '.$row_sp_cungloai['masp'].'</p><p>Giá: <font color="#CC0000">'.$price.'</font></p></div>';
	}
	mysql_free_result($sp_cungloai);
	$view_post .= '<div style="clear:both; height:1px"></div></div>';
}